package svgedit.japangui.actions;

import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;

import svgedit.japangui.JapanFrame;


/** Shows confirm changes dialog, then exits the application.
 */
@SuppressWarnings("serial")
public class QuitAction extends AbstractAction {

    private JapanFrame japanFrame;

    /** Create this action for the given frame */
    public QuitAction(JapanFrame japanFrame) {
   		super("\u7D42\u4e86");
        this.japanFrame = japanFrame;
    }

    public void actionPerformed(ActionEvent ae) {
        if (japanFrame.confirmSaveChanges())
            System.exit(0);
    }
}
